//
//  DestinationCollectionViewCell.m
//  WhereToTravel
//
//  Created by dlios on 15/10/12.
//  Copyright © 2015年 zhoushengmin. All rights reserved.
//

#import "DestinationCollectionViewCell.h"

#define W self.contentView.frame.size.width/180
#define H self.contentView.frame.size.height/260

@implementation DestinationCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView {
    [super createView];
    self.bottomView = [[UIImageView alloc]init];
    self.bottomView.frame = CGRectMake(0, 0, 180*W, 260*H);
    [self.contentView addSubview:self.bottomView];
    
    self.numberLab = [[UILabel alloc]init];
    self.numberLab.frame = CGRectMake(100*W, 15*H, 60*W, 30*H);
    self.numberLab.font = [UIFont systemFontOfSize:20];
    self.numberLab.textColor = [UIColor whiteColor];
    self.numberLab.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.230];
    self.numberLab.textAlignment =  NSTextAlignmentCenter;
    [self.bottomView addSubview:self.numberLab];
    
    self.cityLab = [[UILabel alloc]init];
    self.cityLab.frame = CGRectMake(100*W, 45*H, 60*W, 30*H);
    self.cityLab.font = [UIFont systemFontOfSize:15];
    self.cityLab.textColor = [UIColor whiteColor];
    self.cityLab.backgroundColor = self.numberLab.backgroundColor;
    self.cityLab.textAlignment =  NSTextAlignmentCenter;
    [self.bottomView addSubview:self.cityLab];
    
    self.countryLab = [[UILabel alloc]init];
    self.countryLab.frame = CGRectMake(0, 200*H, 180*W, 30*H);
    self.countryLab.textColor = [UIColor whiteColor];
    self.countryLab.backgroundColor = [UIColor colorWithRed:arc4random()%256/256.0 green:arc4random()%256/256.0 blue:arc4random()%256/256.0     alpha:1];
    [self.bottomView addSubview:self.countryLab];
    
    self.englishLab = [[UILabel alloc]init];
    self.englishLab.frame = CGRectMake(0, 230*H, 180*W, 30*H);
    self.englishLab.font = [UIFont systemFontOfSize:15];
    self.englishLab.textColor = [UIColor whiteColor];
    self.englishLab.backgroundColor = self.countryLab.backgroundColor;
    [self.bottomView addSubview:self.englishLab];
}




@end
